/*
 * @Author: szx
 * @Date: 2022-03-17 13:10:21
 * @LastEditTime: 2022-03-17 13:28:29
 * @Description:
 * @FilePath: \leetcode\剑指offer\10\10_II.js
 */
/**
 * @param {number} n
 * @return {number}
 */
var numWays = function (n) {
    let dp1 = 1,
        dp2 = 1;
    for (let i = 2; i <= n; i++) {
        [dp1, dp2] = [dp2, dp1 + dp2];
    }
    return dp;
};
console.log(numWays(78));
